

package com.hazelcast.collection.impl.set;

import com.hazelcast.collection.ISet;
import com.hazelcast.collection.LocalSetStats;
import com.hazelcast.collection.impl.collection.AbstractCollectionProxyImpl;
import com.hazelcast.config.CollectionConfig;
import com.hazelcast.spi.impl.NodeEngine;

public class SetProxyImpl<E> extends AbstractCollectionProxyImpl<SetService, E> implements ISet<E> {

    public SetProxyImpl(String name, NodeEngine nodeEngine, SetService service) {
        super(name, nodeEngine, service);
    }

    @Override
    protected CollectionConfig getConfig(NodeEngine nodeEngine) {
        return nodeEngine.getConfig().findSetConfig(name);
    }

    @Override
    public String getServiceName() {
        return SetService.SERVICE_NAME;
    }

    @Override
    public LocalSetStats getLocalSetStats() {
        return getService().getLocalCollectionStats(name);
    }
}
